Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

diagram snippets #31

Merged
merged 88 commits into from
May 22, 2024
Merged

diagram snippets #31

merged 88 commits into from
May 22, 2024

Conversation

Drakae
Copy link
Contributor

@Drakae Drakae commented Apr 17, 2024

In the activity bar, a panel for diagram snippets for control structures is added. When opening it the first time, default snippets are added. A snippet contains the textual definition and is rendered live with Sprotty to show it in the panel (webview must be opened, otherwise the panel does not work). Clicking on a snippet adds the textual definition in the editor at the end of the control structure section. If so far no control structure section is defined, the section is added containing the selected snippet.

Additionally, selecting some part of a textual defined control structure and selecting "Add STPA Template", adds a corresponding diagram snippet to the panel in the acitivity bar. The snippet is saved in the settings file, hence reopening VS Code does not delete the custom snippets.

@Drakae Drakae requested a review from Eddykasp May 8, 2024 11:33
Copy link
Contributor

@Eddykasp Eddykasp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like the hardcoded snippet functions

extension/src-diagram-snippets/css/diagram.css Outdated Show resolved Hide resolved
extension/src-diagram-snippets/css/diagram.css Outdated Show resolved Hide resolved
extension/src-diagram-snippets/css/diagram.css Outdated Show resolved Hide resolved
extension/src-diagram-snippets/css/diagram.css Outdated Show resolved Hide resolved
extension/src-diagram-snippets/css/diagram.css Outdated Show resolved Hide resolved
extension/src/diagram-snippets-webview.ts Outdated Show resolved Hide resolved
extension/src/diagram-snippets-webview.ts Show resolved Hide resolved
extension/src/diagram-snippets-webview.ts Outdated Show resolved Hide resolved
extension/src/diagram-snippets-webview.ts Outdated Show resolved Hide resolved
extension/src/utils.ts Outdated Show resolved Hide resolved
@Drakae Drakae requested a review from Eddykasp May 22, 2024 13:45
Copy link
Contributor

@Eddykasp Eddykasp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

extension/src-diagram-snippets/css/diagram.css Outdated Show resolved Hide resolved
extension/src-diagram-snippets/css/stpa-diagram.css Outdated Show resolved Hide resolved
@Drakae Drakae merged commit 3f46862 into master May 22, 2024
1 check passed
@Drakae Drakae deleted the jep/activityBar branch May 22, 2024 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants